package com.baseproject.imageload;

import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.support.v4.app.Fragment;
import android.widget.ImageView;

import com.bumptech.glide.load.Transformation;

import java.io.File;

/**
 * Created by Anthony on 2016/3/3.
 * Class Note:
 * abstract class/interface defined to load imageload
 * (Strategy Pattern used here)
 */
public interface BaseImageLoaderStrategy {
    BaseImageLoaderStrategy with(Context context);
    BaseImageLoaderStrategy with(Fragment fragment);
    BaseImageLoaderStrategy with(Activity activity);
    BaseImageLoaderStrategy load(File file);
    BaseImageLoaderStrategy load(String url);
    BaseImageLoaderStrategy placeholder(int resourceId);
    BaseImageLoaderStrategy dontAnimate();
    BaseImageLoaderStrategy error(int resourceId);
    BaseImageLoaderStrategy crossFade(int duration);
    BaseImageLoaderStrategy bitmapTransform(Transformation<Bitmap>... bitmapTransformations);
    BaseImageLoaderStrategy into(ImageView imageView);

}
